﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;

namespace JuSolution.Web.ApiService.Sys
{
    /// <summary>
    /// SystemErrorLog 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务，请取消注释以下行。 
    // [System.Web.Script.Services.ScriptService]
    public class SystemErrorLog : System.Web.Services.WebService
    {

        [WebMethod]
        public void Insert(String JsonOfEntity)
        {
            JuCloudy.Data.Nhibernate.SysErrorLogContainer container
                = new JuCloudy.Data.Nhibernate.SysErrorLogContainer();
            container.Insert((JuCloudy.Data.Entity.SysErrorLog)JsonOfEntity.Deserialize(typeof(JuCloudy.Data.Entity.SysErrorLog)));
        }

        [WebMethod]
        public String GetEntities()
        {
            JuCloudy.Data.Nhibernate.SysErrorLogContainer container
                = new JuCloudy.Data.Nhibernate.SysErrorLogContainer();
            return container.GetEntities().Serialize();
        }
    }
}
